// 文章实体接口
export interface Article {
  id: number;
  title: string;
  content: string;
  excerpt?: string;
  coverImage?: string;
  categoryId: number;
  tags?: Array<{ id: number; name: string }>;
  category?: { id: number; name: string }; // 添加分类信息
  viewCount: number;
  likeCount: number;
  commentCount: number;
  authorId: number;
  author?: { id: number; username: string; avatar?: string };
  status: string; // 状态
  isActive?: number; // 审核状态：1-通过，-1-未审核，0-已删除
  createdAt: string;
  updatedAt: string;
}

// 创建文章请求接口
export interface CreateArticleDto {
  title: string;
  content: string;
  excerpt?: string;
  coverImage?: string;
  categoryId: number;
  tagIds: number[];
}

// 更新文章请求接口
export interface UpdateArticleDto {
  title?: string;
  content?: string;
  excerpt?: string;
  coverImage?: string;
  categoryId?: number;
  tagIds?: number[];
  status?: string;
}

// 文章响应接口
export interface ArticleResponseDto extends Article {}

// 文章列表查询参数
export interface ArticleQueryParams {
  categoryId?: number;
  search?: string;
  page?: number;
  limit?: number;
}

// 文章列表响应
export interface ArticleListResponse {
  data: Article[];
  total: number;
  page: number;
  limit: number;
  totalPages: number;
}